package exer;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author tongchen
 * @create 2023-03-30 19:52
 */
@WebServlet("/hello")
public class HelloServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //思路：通过servlet对应的方法获取请求，然后根据请求发送对应的响应，同时需要注解规定路径
        System.out.println("get request");
        resp.getWriter().write("response ....");


    }
}
